package singleton;

/**
 * @author Brook
 *
 * 静态内部类方式，可用
 * 就是当我们真正调用getINstance方法的时候才会实例化内部类里面的实例对象
 *
 */
public class Singleton7
{

    private Singleton7() {

    }
    private static class SingletonInstance {
        private static final Singleton7 INSTANCE = new Singleton7();
    }

    public static Singleton7 getInstance() {

        return SingletonInstance.INSTANCE;
    }
}
